package com.taotao.controller;

import com.taotao.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/html")
public class HtmlTestController {

	@Autowired
	private ItemService itemService;
    @RequestMapping("/{itemId}")
    @ResponseBody
    public ModelAndView getItemParamHtml(@PathVariable(value="itemId") Long itemId) {
        ModelAndView mav = new ModelAndView("itemParam");
        String html = itemService.getItemParamHtml(itemId);
        mav.addObject("htmltable",html);
        return mav;
    }


}
